package com.glq1218.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glq1218.domain.UserRole;
import com.glq1218.role.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author glq1218
 * @description TODO
 * @since 2023/4/11 13:38
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    List<String> queryRoleNameListByUserId(Long id);

    List<UserRole> queryRoleListByUserId(Long userId);

    int deleteRolePermission(Long id);

    int addRolePermission(@Param("roleId") Long roleId, @Param("permissionList") List<Long> permissionList);
}
